﻿using System;
using System.Collections.ObjectModel;

namespace Builderator.Core
{
    public class JobList : ObservableCollection<Job>
    {
        public Job Find(Job job)
        {
            foreach (Job item in this)
            {
                if (item.Identifier == job.Identifier)
                    return item;
            }

            return null;
        }

        public bool Exists(Guid identifier)
        {
            foreach (Job item in this)
            {
                if (item.Identifier == identifier)
                    return true;
            }

            return false;
        }
    }
}